package com.zy.entity.crm;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

import javax.persistence.Table;
import javax.persistence.Transient;

import org.springframework.util.StringUtils;

import com.zy.entity.base.BaseEntity;
import com.zy.entity.bs.CustomerClub;
import com.zy.pojo.annotation.Comment;

@Table(name = "crm_customer")
public class Customer extends BaseEntity {

	private static final long serialVersionUID = 1L;

	@Comment("用户Id")
	private Long userId;
	@Transient
	@Comment("姓名")
	private String customerName;
	@Comment("头像路径")
	private String avatarUrl;
	@Comment("手机号")
	private String mobile;
	@Comment("")
	private String payPsw;
	@Comment("")
	private String address;
	@Transient
	private String clubName;
	@Transient
	private String ids;
	@Transient
	private String userName;
	@Transient
	@Comment("身份证号")
	private String cardNo;
	@Comment("身份证正面")
	@Transient
	private String carPositiveUrl;
	@Comment("身份证反面")
	@Transient
	private String carSideUrl;
	@Comment("用户")
	@Transient
	private Long customerId;
	@Transient
	private Integer sex;
	@Transient
	private Long cityId;
	@Transient
	private String carNo;//车牌号
	@Transient
	private String positiveUrl;//正面
	@Transient
	private String leftUrl;//右
	@Transient
	private String rightUrl;//右
	@Transient
	private String sideUrl;//侧面
	@Comment("驾驶内页")
	@Transient
	private String innerUrl;
	@Transient
	@Comment("副页")
	private String secondUrl;
	@Transient
	@Comment("行驶内页")
	private String driveInnerUrl;
	@Comment("行驶副页")
	@Transient
	private String driveSecondUrl;
	@Transient
	@Comment("")
	private Long carTypeId;
	@Transient
	@Comment("")
	private String name;
    @Transient
	private String nikeName;//呢称

	@Transient
	private Long birthDate;//出生日期
    @Transient
    private String signature;

    public String getSignature() {
        return signature;
    }

    public void setSignature(String signature) {
        this.signature = signature;
    }

    public String getNikeName() {
        return nikeName;
    }

    public void setNikeName(String nikeName) {
        this.nikeName = nikeName;
    }

    public Long getBirthDate() {
        return birthDate;
    }

    public void setBirthDate(Long birthDate) {
        this.birthDate = birthDate;
    }

    public Long getCarTypeId() {
		return carTypeId;
	}

	public void setCarTypeId(Long carTypeId) {
		this.carTypeId = carTypeId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public static long getSerialVersionUID() {
		return serialVersionUID;
	}

	public String getCardNo() {
		return cardNo;
	}

	public void setCardNo(String cardNo) {
		this.cardNo = cardNo;
	}

	public String getCarPositiveUrl() {
		return carPositiveUrl;
	}

	public void setCarPositiveUrl(String carPositiveUrl) {
		this.carPositiveUrl = carPositiveUrl;
	}

	public String getCarSideUrl() {
		return carSideUrl;
	}

	public void setCarSideUrl(String carSideUrl) {
		this.carSideUrl = carSideUrl;
	}

	public Long getCustomerId() {
		return customerId;
	}

	public void setCustomerId(Long customerId) {
		this.customerId = customerId;
	}

	public Integer getSex() {
		return sex;
	}

	public void setSex(Integer sex) {
		this.sex = sex;
	}

	public Long getCityId() {
		return cityId;
	}

	public void setCityId(Long cityId) {
		this.cityId = cityId;
	}

	public String getCarNo() {
		return carNo;
	}

	public void setCarNo(String carNo) {
		this.carNo = carNo;
	}

	public String getPositiveUrl() {
		return positiveUrl;
	}

	public void setPositiveUrl(String positiveUrl) {
		this.positiveUrl = positiveUrl;
	}

	public String getLeftUrl() {
		return leftUrl;
	}

	public void setLeftUrl(String leftUrl) {
		this.leftUrl = leftUrl;
	}

	public String getRightUrl() {
		return rightUrl;
	}

	public void setRightUrl(String rightUrl) {
		this.rightUrl = rightUrl;
	}

	public String getSideUrl() {
		return sideUrl;
	}

	public void setSideUrl(String sideUrl) {
		this.sideUrl = sideUrl;
	}

	public String getInnerUrl() {
		return innerUrl;
	}

	public void setInnerUrl(String innerUrl) {
		this.innerUrl = innerUrl;
	}

	public String getSecondUrl() {
		return secondUrl;
	}

	public void setSecondUrl(String secondUrl) {
		this.secondUrl = secondUrl;
	}

	public String getDriveInnerUrl() {
		return driveInnerUrl;
	}

	public void setDriveInnerUrl(String driveInnerUrl) {
		this.driveInnerUrl = driveInnerUrl;
	}

	public String getDriveSecondUrl() {
		return driveSecondUrl;
	}

	public void setDriveSecondUrl(String driveSecondUrl) {
		this.driveSecondUrl = driveSecondUrl;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getIds() {
		return ids;
	}

	public void setIds(String ids) {
		this.ids = ids;
	}

	public String getClubName() {
		return clubName;
	}

	public void setClubName(String clubName) {
		this.clubName = clubName;
	}

	public Long getUserId() {
		return userId;
	}
	public void setUserId(Long userId) {
		this.userId = userId;
	}
	public String getCustomerName() {
		return customerName;
	}
	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}
	public String getAvatarUrl() {
		return avatarUrl;
	}
	public void setAvatarUrl(String avatarUrl) {
		this.avatarUrl = avatarUrl;
	}
	public String getMobile() {
		return mobile;
	}
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	public String getPayPsw() {
		return payPsw;
	}
	public void setPayPsw(String payPsw) {
		this.payPsw = payPsw;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public static void main(String[] args){
		CustomerClub c = new CustomerClub();
		c.setClubId(1L);
		c.setCustomerId(2L);
		CustomerClub c1 = new CustomerClub();
		c1.setClubId(2L);
		c1.setCustomerId(2L);
		CustomerClub c2 = new CustomerClub();
		c2.setClubId(3L);
		c2.setCustomerId(2L);
		List<CustomerClub> cc = new ArrayList<>();
		cc.add(c1);
		cc.add(c);
		cc.add(c2);
		List<Long> q1 = cc.stream().map(ccs->ccs.getClubId()).collect(Collectors.toList());

		 System.out.print(StringUtils.collectionToDelimitedString(q1,","));

	}

}